﻿using Furion.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using todo.EntityFramework.Entities;
using todo.EntityFramework.FromBody;
using todo.EntityFramework.ViewModels.UI;
using todo.IRepository;
using todo.bases.Services;
using todo.user.IServices;

namespace todo.user.Services
{
   public class DoUserServices : BaseServices<DoUser>, IDoUserServices, ITransient
    {
        private readonly IDoUserRepository _dal;
        private readonly IUnitOfWork _unitOfWork;

        public DoUserServices(IDoUserRepository dal,
                                IUnitOfWork unitOfWork)
        {
            this._dal = dal;
            base.BaseDal = dal;
            _unitOfWork = unitOfWork;
        }

        public async Task<AdminUiCallBack> AddBooks(FMBooksInsertModel entity)
        {
            DoUser user = new DoUser();
            user.UserName = "测试用户";
            return await _dal.InsertAsync(user);
        }

        public Task<AdminUiCallBack> DeleteBooksByIdsAsync(int[] ids)
        {
            throw new NotImplementedException();
        }

        public Task<AdminUiCallBack> UpdateBooksAsync(FMBooksInsertModel entity)
        {
            throw new NotImplementedException();
        }
    }
}
